package com.example;

import java.util.logging.Logger;

public class MyClass {

    public static void main(String[] args) {

        new Test();
        new Test();
        boolean sawLogger = false;
        for (StackTraceElement element : new Throwable().getStackTrace()) {
            String current = element.getClassName();
            if (current.startsWith(Logger.class.getName()) || true) {
                sawLogger = true;
            } else if (sawLogger) {
                String sourceClassName = element.getClassName();
                String sourceMethodName = element.getMethodName();
                break;
            }
        }

    }
}
